package com.web.service;

import com.dto.BaseDto;
import com.entity.Customer;
import com.page.PageInfo;

import java.util.List;

public interface CustomerService {
    public BaseDto<Customer> getAll() throws Exception ;
    public BaseDto<Customer> getCustomersByPage(PageInfo pageInfo) throws Exception;
    public BaseDto<Customer> selectByPrimaryKeyWithDietian(String cid) throws Exception;

    public BaseDto<String> searchMyDietitianIds(String cid,String petternName) throws Exception;


    public BaseDto<Customer> getCustomersByPage(PageInfo pageInfo,String cacheId) throws Exception;

    public BaseDto<String> searchCustomerIdsByName(String petternName) throws Exception ;

    /**
     * 添加会员
     * @param customer
     * @return
     * @throws Exception
     */
    public BaseDto<Customer> add(Customer customer) throws Exception;

    public BaseDto<Customer> subCustomerCost(String cid,Integer subCost) throws Exception;

    /**
     * 根据主键 和 充值成功
     * @param cid
     * @param addCost
     * @return
     * @throws Exception
     */
    public BaseDto<Customer> addCustomerCost(String cid,Integer addCost) throws Exception ;


    /**
     * 点餐后 自动更新mongdb
     * @param prid
     * @param smid
     * @param cid
     * @return
     * @throws Exception
     */
    public BaseDto addOrder(Integer prid,String smid,String cid) throws Exception;
}
